.TH "datatypes.h" 3 "Wed Sep 16 2015" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
datatypes.h \- 
.SH SYNOPSIS
.br
.PP
\fC#include <stdint\&.h>\fP
.br
\fC#include <stdbool\&.h>\fP
.br
\fC#include 'ch\&.h'\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBmc_rpm_dep_struct\fP"
.br
.ti -1c
.RI "struct \fBmc_configuration\fP"
.br
.ti -1c
.RI "struct \fBppm_config\fP"
.br
.ti -1c
.RI "struct \fBadc_config\fP"
.br
.ti -1c
.RI "struct \fBchuk_config\fP"
.br
.ti -1c
.RI "struct \fBapp_configuration\fP"
.br
.ti -1c
.RI "struct \fBfault_data\fP"
.br
.ti -1c
.RI "struct \fBchuck_data\fP"
.br
.ti -1c
.RI "struct \fBcan_status_msg\fP"
.br
.ti -1c
.RI "struct \fBmote_state\fP"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBmc_state\fP { \fBMC_STATE_OFF\fP = 0, \fBMC_STATE_DETECTING\fP, \fBMC_STATE_RUNNING\fP, \fBMC_STATE_FULL_BRAKE\fP }"
.br
.ti -1c
.RI "enum \fBmc_pwm_mode\fP { \fBPWM_MODE_NONSYNCHRONOUS_HISW\fP = 0, \fBPWM_MODE_SYNCHRONOUS\fP, \fBPWM_MODE_BIPOLAR\fP }"
.br
.ti -1c
.RI "enum \fBmc_comm_mode\fP { \fBCOMM_MODE_INTEGRATE\fP = 0, \fBCOMM_MODE_DELAY\fP }"
.br
.ti -1c
.RI "enum \fBmc_sensor_mode\fP { \fBSENSOR_MODE_SENSORLESS\fP = 0, \fBSENSOR_MODE_SENSORED\fP, \fBSENSOR_MODE_HYBRID\fP }"
.br
.ti -1c
.RI "enum \fBmc_motor_type\fP { \fBMOTOR_TYPE_BLDC\fP = 0, \fBMOTOR_TYPE_DC\fP }"
.br
.ti -1c
.RI "enum \fBmc_fault_code\fP { \fBFAULT_CODE_NONE\fP = 0, \fBFAULT_CODE_OVER_VOLTAGE\fP, \fBFAULT_CODE_UNDER_VOLTAGE\fP, \fBFAULT_CODE_DRV8302\fP, \fBFAULT_CODE_ABS_OVER_CURRENT\fP, \fBFAULT_CODE_OVER_TEMP_FET\fP, \fBFAULT_CODE_OVER_TEMP_MOTOR\fP }"
.br
.ti -1c
.RI "enum \fBmc_control_mode\fP { \fBCONTROL_MODE_DUTY\fP = 0, \fBCONTROL_MODE_SPEED\fP, \fBCONTROL_MODE_CURRENT\fP, \fBCONTROL_MODE_CURRENT_BRAKE\fP, \fBCONTROL_MODE_POS\fP, \fBCONTROL_MODE_NONE\fP }"
.br
.ti -1c
.RI "enum \fBapp_use\fP { \fBAPP_NONE\fP = 0, \fBAPP_PPM\fP, \fBAPP_ADC\fP, \fBAPP_UART\fP, \fBAPP_PPM_UART\fP, \fBAPP_ADC_UART\fP, \fBAPP_NUNCHUK\fP, \fBAPP_NRF\fP, \fBAPP_CUSTOM\fP }"
.br
.ti -1c
.RI "enum \fBppm_control_type\fP { \fBPPM_CTRL_TYPE_NONE\fP = 0, \fBPPM_CTRL_TYPE_CURRENT\fP, \fBPPM_CTRL_TYPE_CURRENT_NOREV\fP, \fBPPM_CTRL_TYPE_CURRENT_NOREV_BRAKE\fP, \fBPPM_CTRL_TYPE_DUTY\fP, \fBPPM_CTRL_TYPE_DUTY_NOREV\fP, \fBPPM_CTRL_TYPE_PID\fP, \fBPPM_CTRL_TYPE_PID_NOREV\fP }"
.br
.ti -1c
.RI "enum \fBadc_control_type\fP { \fBADC_CTRL_TYPE_NONE\fP = 0, \fBADC_CTRL_TYPE_CURRENT\fP, \fBADC_CTRL_TYPE_CURRENT_REV_CENTER\fP, \fBADC_CTRL_TYPE_CURRENT_REV_BUTTON\fP, \fBADC_CTRL_TYPE_CURRENT_NOREV_BRAKE_CENTER\fP, \fBADC_CTRL_TYPE_CURRENT_NOREV_BRAKE_BUTTON\fP, \fBADC_CTRL_TYPE_DUTY\fP, \fBADC_CTRL_TYPE_DUTY_REV_CENTER\fP, \fBADC_CTRL_TYPE_DUTY_REV_BUTTON\fP }"
.br
.ti -1c
.RI "enum \fBchuk_control_type\fP { \fBCHUK_CTRL_TYPE_NONE\fP = 0, \fBCHUK_CTRL_TYPE_CURRENT\fP, \fBCHUK_CTRL_TYPE_CURRENT_NOREV\fP }"
.br
.ti -1c
.RI "enum \fBCOMM_PACKET_ID\fP { \fBCOMM_FW_VERSION\fP = 0, \fBCOMM_JUMP_TO_BOOTLOADER\fP, \fBCOMM_ERASE_NEW_APP\fP, \fBCOMM_WRITE_NEW_APP_DATA\fP, \fBCOMM_GET_VALUES\fP, \fBCOMM_SET_DUTY\fP, \fBCOMM_SET_CURRENT\fP, \fBCOMM_SET_CURRENT_BRAKE\fP, \fBCOMM_SET_RPM\fP, \fBCOMM_SET_POS\fP, \fBCOMM_SET_DETECT\fP, \fBCOMM_SET_SERVO_POS\fP, \fBCOMM_SET_MCCONF\fP, \fBCOMM_GET_MCCONF\fP, \fBCOMM_SET_APPCONF\fP, \fBCOMM_GET_APPCONF\fP, \fBCOMM_SAMPLE_PRINT\fP, \fBCOMM_TERMINAL_CMD\fP, \fBCOMM_PRINT\fP, \fBCOMM_ROTOR_POSITION\fP, \fBCOMM_EXPERIMENT_SAMPLE\fP, \fBCOMM_DETECT_MOTOR_PARAM\fP, \fBCOMM_REBOOT\fP, \fBCOMM_ALIVE\fP, \fBCOMM_GET_DECODED_PPM\fP, \fBCOMM_GET_DECODED_ADC\fP, \fBCOMM_GET_DECODED_CHUK\fP, \fBCOMM_FORWARD_CAN\fP }"
.br
.ti -1c
.RI "enum \fBCAN_PACKET_ID\fP { \fBCAN_PACKET_SET_DUTY\fP = 0, \fBCAN_PACKET_SET_CURRENT\fP, \fBCAN_PACKET_SET_CURRENT_BRAKE\fP, \fBCAN_PACKET_SET_RPM\fP, \fBCAN_PACKET_SET_POS\fP, \fBCAN_PACKET_FILL_RX_BUFFER\fP, \fBCAN_PACKET_FILL_RX_BUFFER_LONG\fP, \fBCAN_PACKET_PROCESS_RX_BUFFER\fP, \fBCAN_PACKET_PROCESS_SHORT_BUFFER\fP, \fBCAN_PACKET_STATUS\fP }"
.br
.ti -1c
.RI "enum \fBLED_EXT_STATE\fP { \fBLED_EXT_OFF\fP = 0, \fBLED_EXT_NORMAL\fP, \fBLED_EXT_BRAKE\fP, \fBLED_EXT_TURN_LEFT\fP, \fBLED_EXT_TURN_RIGHT\fP, \fBLED_EXT_BRAKE_TURN_LEFT\fP, \fBLED_EXT_BRAKE_TURN_RIGHT\fP, \fBLED_EXT_BATT\fP }"
.br
.ti -1c
.RI "enum \fBMOTE_PACKET\fP { \fBMOTE_PACKET_BATT_LEVEL\fP = 0, \fBMOTE_PACKET_BUTTONS\fP, \fBMOTE_PACKET_ALIVE\fP }"
.br
.in -1c
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBadc_control_type\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIADC_CTRL_TYPE_NONE \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_CURRENT \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_CURRENT_REV_CENTER \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_CURRENT_REV_BUTTON \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_CURRENT_NOREV_BRAKE_CENTER \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_CURRENT_NOREV_BRAKE_BUTTON \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_DUTY \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_DUTY_REV_CENTER \fP\fP
.TP
\fB\fIADC_CTRL_TYPE_DUTY_REV_BUTTON \fP\fP
.SS "enum \fBapp_use\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIAPP_NONE \fP\fP
.TP
\fB\fIAPP_PPM \fP\fP
.TP
\fB\fIAPP_ADC \fP\fP
.TP
\fB\fIAPP_UART \fP\fP
.TP
\fB\fIAPP_PPM_UART \fP\fP
.TP
\fB\fIAPP_ADC_UART \fP\fP
.TP
\fB\fIAPP_NUNCHUK \fP\fP
.TP
\fB\fIAPP_NRF \fP\fP
.TP
\fB\fIAPP_CUSTOM \fP\fP
.SS "enum \fBCAN_PACKET_ID\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fICAN_PACKET_SET_DUTY \fP\fP
.TP
\fB\fICAN_PACKET_SET_CURRENT \fP\fP
.TP
\fB\fICAN_PACKET_SET_CURRENT_BRAKE \fP\fP
.TP
\fB\fICAN_PACKET_SET_RPM \fP\fP
.TP
\fB\fICAN_PACKET_SET_POS \fP\fP
.TP
\fB\fICAN_PACKET_FILL_RX_BUFFER \fP\fP
.TP
\fB\fICAN_PACKET_FILL_RX_BUFFER_LONG \fP\fP
.TP
\fB\fICAN_PACKET_PROCESS_RX_BUFFER \fP\fP
.TP
\fB\fICAN_PACKET_PROCESS_SHORT_BUFFER \fP\fP
.TP
\fB\fICAN_PACKET_STATUS \fP\fP
.SS "enum \fBchuk_control_type\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fICHUK_CTRL_TYPE_NONE \fP\fP
.TP
\fB\fICHUK_CTRL_TYPE_CURRENT \fP\fP
.TP
\fB\fICHUK_CTRL_TYPE_CURRENT_NOREV \fP\fP
.SS "enum \fBCOMM_PACKET_ID\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fICOMM_FW_VERSION \fP\fP
.TP
\fB\fICOMM_JUMP_TO_BOOTLOADER \fP\fP
.TP
\fB\fICOMM_ERASE_NEW_APP \fP\fP
.TP
\fB\fICOMM_WRITE_NEW_APP_DATA \fP\fP
.TP
\fB\fICOMM_GET_VALUES \fP\fP
.TP
\fB\fICOMM_SET_DUTY \fP\fP
.TP
\fB\fICOMM_SET_CURRENT \fP\fP
.TP
\fB\fICOMM_SET_CURRENT_BRAKE \fP\fP
.TP
\fB\fICOMM_SET_RPM \fP\fP
.TP
\fB\fICOMM_SET_POS \fP\fP
.TP
\fB\fICOMM_SET_DETECT \fP\fP
.TP
\fB\fICOMM_SET_SERVO_POS \fP\fP
.TP
\fB\fICOMM_SET_MCCONF \fP\fP
.TP
\fB\fICOMM_GET_MCCONF \fP\fP
.TP
\fB\fICOMM_SET_APPCONF \fP\fP
.TP
\fB\fICOMM_GET_APPCONF \fP\fP
.TP
\fB\fICOMM_SAMPLE_PRINT \fP\fP
.TP
\fB\fICOMM_TERMINAL_CMD \fP\fP
.TP
\fB\fICOMM_PRINT \fP\fP
.TP
\fB\fICOMM_ROTOR_POSITION \fP\fP
.TP
\fB\fICOMM_EXPERIMENT_SAMPLE \fP\fP
.TP
\fB\fICOMM_DETECT_MOTOR_PARAM \fP\fP
.TP
\fB\fICOMM_REBOOT \fP\fP
.TP
\fB\fICOMM_ALIVE \fP\fP
.TP
\fB\fICOMM_GET_DECODED_PPM \fP\fP
.TP
\fB\fICOMM_GET_DECODED_ADC \fP\fP
.TP
\fB\fICOMM_GET_DECODED_CHUK \fP\fP
.TP
\fB\fICOMM_FORWARD_CAN \fP\fP
.SS "enum \fBLED_EXT_STATE\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fILED_EXT_OFF \fP\fP
.TP
\fB\fILED_EXT_NORMAL \fP\fP
.TP
\fB\fILED_EXT_BRAKE \fP\fP
.TP
\fB\fILED_EXT_TURN_LEFT \fP\fP
.TP
\fB\fILED_EXT_TURN_RIGHT \fP\fP
.TP
\fB\fILED_EXT_BRAKE_TURN_LEFT \fP\fP
.TP
\fB\fILED_EXT_BRAKE_TURN_RIGHT \fP\fP
.TP
\fB\fILED_EXT_BATT \fP\fP
.SS "enum \fBmc_comm_mode\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fICOMM_MODE_INTEGRATE \fP\fP
.TP
\fB\fICOMM_MODE_DELAY \fP\fP
.SS "enum \fBmc_control_mode\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fICONTROL_MODE_DUTY \fP\fP
.TP
\fB\fICONTROL_MODE_SPEED \fP\fP
.TP
\fB\fICONTROL_MODE_CURRENT \fP\fP
.TP
\fB\fICONTROL_MODE_CURRENT_BRAKE \fP\fP
.TP
\fB\fICONTROL_MODE_POS \fP\fP
.TP
\fB\fICONTROL_MODE_NONE \fP\fP
.SS "enum \fBmc_fault_code\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIFAULT_CODE_NONE \fP\fP
.TP
\fB\fIFAULT_CODE_OVER_VOLTAGE \fP\fP
.TP
\fB\fIFAULT_CODE_UNDER_VOLTAGE \fP\fP
.TP
\fB\fIFAULT_CODE_DRV8302 \fP\fP
.TP
\fB\fIFAULT_CODE_ABS_OVER_CURRENT \fP\fP
.TP
\fB\fIFAULT_CODE_OVER_TEMP_FET \fP\fP
.TP
\fB\fIFAULT_CODE_OVER_TEMP_MOTOR \fP\fP
.SS "enum \fBmc_motor_type\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIMOTOR_TYPE_BLDC \fP\fP
.TP
\fB\fIMOTOR_TYPE_DC \fP\fP
.SS "enum \fBmc_pwm_mode\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIPWM_MODE_NONSYNCHRONOUS_HISW \fP\fP
.TP
\fB\fIPWM_MODE_SYNCHRONOUS \fP\fP
.TP
\fB\fIPWM_MODE_BIPOLAR \fP\fP
.SS "enum \fBmc_sensor_mode\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fISENSOR_MODE_SENSORLESS \fP\fP
.TP
\fB\fISENSOR_MODE_SENSORED \fP\fP
.TP
\fB\fISENSOR_MODE_HYBRID \fP\fP
.SS "enum \fBmc_state\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIMC_STATE_OFF \fP\fP
.TP
\fB\fIMC_STATE_DETECTING \fP\fP
.TP
\fB\fIMC_STATE_RUNNING \fP\fP
.TP
\fB\fIMC_STATE_FULL_BRAKE \fP\fP
.SS "enum \fBMOTE_PACKET\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIMOTE_PACKET_BATT_LEVEL \fP\fP
.TP
\fB\fIMOTE_PACKET_BUTTONS \fP\fP
.TP
\fB\fIMOTE_PACKET_ALIVE \fP\fP
.SS "enum \fBppm_control_type\fP"

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIPPM_CTRL_TYPE_NONE \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_CURRENT \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_CURRENT_NOREV \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_CURRENT_NOREV_BRAKE \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_DUTY \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_DUTY_NOREV \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_PID \fP\fP
.TP
\fB\fIPPM_CTRL_TYPE_PID_NOREV \fP\fP
.SH "Author"
.PP 
Generated automatically by Doxygen from the source code\&.
